using System;
using System.Collections.Generic;
using System.Text;

namespace Koda.Model
{
    public class MemberInfo
    {
        private MemberAccess access;
        private MemberScope scope;
        private MemberType type;

        public MemberType Type
        {
            get
            {
                return this.type;
            }
            set
            {
                this.type = value;
            }
        }
	

        public MemberScope Scope
        {
            get
            {
                return this.scope;
            }
            set
            {
                this.scope = value;
            }
        }
	

        public MemberAccess Access
        {
            get
            {
                return this.access;
            }
            set
            {
                this.access = value;
            }
        }
	
        public MemberInfo()
        {
            this.access = MemberAccess.Other;
            this.scope = MemberScope.Instance;
            this.type = MemberType.Other;
        }

        public override bool Equals(object obj)
        {
            MemberInfo memberInfo = obj as MemberInfo;
            if (memberInfo == null)
                return false;

            if (memberInfo.Access != this.Access)
                return false;

            if (memberInfo.Scope != this.Scope)
                return false;

            if (memberInfo.Type != this.Type)
                return false;

            return true;
        }

        public override int GetHashCode()
        {
            return this.Access.GetHashCode() ^ this.Scope.GetHashCode() ^ this.Type.GetHashCode();
        }
    }
}
